#include"teacher.h"
#include<stdio.h>


void InitTeacher(teach *t,const char*name,int age)
{
    t->age=age;
    t->size=0;
    strcpy(t->Name,name);
}
void InsertStu(teach *t,int id,const char *stuName)
{
    if(t->size ==StuSize)
    {
        printf("数组已满不允许插入数据\n");
        return;
    }
    InitStu(&t->s[t->size++],id,stuName);
}
void PrintTeacher(teach *t)
{
    printf("老师姓名；%s  年龄%d\n",t->Name,t->age);
    printf("学生信息；\n");
    for(int i=0;i<t->size;i++)
    {
        PrintStu(&t->s[i]);
    }
   
}

void RmStuByID(teach *t, int ID)
{
    for(int i=0;i<t->size;i++)
    {
        if(t->s[i].id==ID)
        {
             RemoveByIndex(&t,i);
        }
    
    }
    
}

void RmStuByName(teach *t, char *name)
{
        for(int i=0;i<t->size;i++)
    {
        if(t->s[i].Name==name)
        {
             RemoveByIndex(&t,i);
        }
    
    }
}

void RemoveByIndex(teach *t, int index)
{
    for(int i=index;i<t->size-1;i++)
    {
        t->s[i]=t->s[i+1];
    }
}

stu *FindStuByName(teach *t,);

stu *FindStuByName(teach *t, )
{
    return 
}
